package com.sa.ibiz.demo.demo.domain;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty.Access;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import org.springframework.cglib.beans.BeanMap;
import org.springframework.cglib.beans.BeanGenerator;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import java.util.Map;
import java.util.HashMap;
import org.springframework.util.StringUtils;
import com.sa.ibiz.demo.ibizutil.security.AuthenticationUser;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.springframework.util.DigestUtils;
import org.springframework.util.StringUtils;
import java.util.UUID;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import org.springframework.cglib.beans.BeanCopier;
import com.sa.ibiz.demo.ibizutil.annotation.Dict;
import com.sa.ibiz.demo.ibizutil.domain.EntityBase;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import java.math.BigInteger;
import com.sa.ibiz.demo.ibizutil.enums.FillMode;
import com.sa.ibiz.demo.ibizutil.enums.PredefinedType;
import com.sa.ibiz.demo.ibizutil.annotation.PreField;
import com.alibaba.fastjson.annotation.JSONField;

import com.sa.ibiz.demo.demo.domain.WFInstance;
import com.sa.ibiz.demo.demo.domain.WFUser;

/**
 * 实体[WFWorkList] 数据对象
 */
@TableName(value = "T_SRFWFWORKLIST",resultMap = "WFWorkListResultMap")
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class WFWorkList extends EntityBase implements Serializable{

    @JSONField(serialize = false)
    @JsonIgnore
    @TableField(exist = false)//关系主表数据
    private WFInstance wfinstance;
    @JSONField(serialize = false)
    @JsonIgnore
    @TableField(exist = false)//关系主表数据
    private WFUser originalwfuser;
    @Dict(dictName = "WorkflowMob_YesNoCodeList")
    private Integer cancelflag;
    @Dict(dictName = "WorkflowMob_YesNoCodeList")
    private Integer cancelinform;
    @PreField(fill= FillMode.INSERT,preType = PredefinedType.CREATEDATE)
    private Timestamp createdate;
    @PreField(fill= FillMode.INSERT,preType = PredefinedType.CREATEMAN)
    @Dict(dictName = "WorkflowMob_SysOperatorCodeList")
    private String createman;
    private String originalwfuserid;
    private String originalwfusername;
    @PreField(fill= FillMode.INSERT_UPDATE,preType = PredefinedType.UPDATEDATE)
    private Timestamp updatedate;
    @PreField(fill= FillMode.INSERT_UPDATE,preType = PredefinedType.UPDATEMAN)
    @Dict(dictName = "WorkflowMob_SysOperatorCodeList")
    private String updateman;
    private String userdata;
    private String userdata2;
    private String userdata3;
    private String userdata4;
    private String userdatainfo;
    private String wfactorid;
    private String wfinstanceid;
    private String wfinstancename;
    private String wflanrestag;
    private String wfstepid;
    private String wfsteplanrestag;
    private String wfstepname;
    private String wfworkflowid;
    private String wfworkflowname;
    @TableId(value= "wfworklistid",type=IdType.UUID)//指定主键生成策略
    private String wfworklistid;
    private String wfworklistname;
    @Dict(dictName = "WorkflowMob_YesNoCodeList")
    private Integer workinform;
    /**
     *  设置属性值[工作取消标志]
     *  @param cancelflag
     */
    public void setCancelflag(Integer cancelflag){
        this.cancelflag = cancelflag;
        this.set("cancelflagdirtyflag",true);
    }
    /**
     *  获取属性值[工作取消标志]
     */
    public Integer getCancelflag(){
        return this.cancelflag;
    }
    /**
     *  重置属性值[工作取消标志]
     */
    public void resetCancelflag(){
        this.set("cancelflagdirtyflag",false);
        this.cancelflag = null;
    }
    /**
     *  设置属性值[取消通知]
     *  @param cancelinform
     */
    public void setCancelinform(Integer cancelinform){
        this.cancelinform = cancelinform;
        this.set("cancelinformdirtyflag",true);
    }
    /**
     *  获取属性值[取消通知]
     */
    public Integer getCancelinform(){
        return this.cancelinform;
    }
    /**
     *  重置属性值[取消通知]
     */
    public void resetCancelinform(){
        this.set("cancelinformdirtyflag",false);
        this.cancelinform = null;
    }
    /**
     *  设置属性值[建立时间]
     *  @param createdate
     */
    public void setCreatedate(Timestamp createdate){
        this.createdate = createdate;
        this.set("createdatedirtyflag",true);
    }
    /**
     *  获取属性值[建立时间]
     */
    public Timestamp getCreatedate(){
        return this.createdate;
    }
    /**
     *  重置属性值[建立时间]
     */
    public void resetCreatedate(){
        this.set("createdatedirtyflag",false);
        this.createdate = null;
    }
    /**
     *  设置属性值[建立人]
     *  @param createman
     */
    public void setCreateman(String createman){
        if(StringUtils.isEmpty(createman))
            createman=null;
        this.createman = createman;
        this.set("createmandirtyflag",true);
    }
    /**
     *  获取属性值[建立人]
     */
    public String getCreateman(){
        return this.createman;
    }
    /**
     *  重置属性值[建立人]
     */
    public void resetCreateman(){
        this.set("createmandirtyflag",false);
        this.createman = null;
    }
    /**
     *  设置属性值[源流程用户]
     *  @param originalwfuserid
     */
    public void setOriginalwfuserid(String originalwfuserid){
        if(StringUtils.isEmpty(originalwfuserid))
            originalwfuserid=null;
        this.originalwfuserid = originalwfuserid;
        this.set("originalwfuseriddirtyflag",true);
    }
    /**
     *  获取属性值[源流程用户]
     */
    public String getOriginalwfuserid(){
        return this.originalwfuserid;
    }
    /**
     *  重置属性值[源流程用户]
     */
    public void resetOriginalwfuserid(){
        this.set("originalwfuseriddirtyflag",false);
        this.originalwfuserid = null;
    }
    /**
     *  设置属性值[源流程用户]
     *  @param originalwfusername
     */
    public void setOriginalwfusername(String originalwfusername){
        if(StringUtils.isEmpty(originalwfusername))
            originalwfusername=null;
        this.originalwfusername = originalwfusername;
        this.set("originalwfusernamedirtyflag",true);
    }
    /**
     *  获取属性值[源流程用户]
     */
    public String getOriginalwfusername(){
        //填充物理化的外键值附加数据
        if(StringUtils.isEmpty(this.originalwfusername)&&(!StringUtils.isEmpty(this.getOriginalwfuserid())) && this.getOriginalwfuser()!=null)
        {
            this.originalwfusername = this.getOriginalwfuser().getWfusername();
            this.set("originalwfusernamedirtyflag",true);
        }
        return this.originalwfusername;
    }
    /**
     *  重置属性值[源流程用户]
     */
    public void resetOriginalwfusername(){
        this.set("originalwfusernamedirtyflag",false);
        this.originalwfusername = null;
    }
    /**
     *  设置属性值[更新时间]
     *  @param updatedate
     */
    public void setUpdatedate(Timestamp updatedate){
        this.updatedate = updatedate;
        this.set("updatedatedirtyflag",true);
    }
    /**
     *  获取属性值[更新时间]
     */
    public Timestamp getUpdatedate(){
        return this.updatedate;
    }
    /**
     *  重置属性值[更新时间]
     */
    public void resetUpdatedate(){
        this.set("updatedatedirtyflag",false);
        this.updatedate = null;
    }
    /**
     *  设置属性值[更新人]
     *  @param updateman
     */
    public void setUpdateman(String updateman){
        if(StringUtils.isEmpty(updateman))
            updateman=null;
        this.updateman = updateman;
        this.set("updatemandirtyflag",true);
    }
    /**
     *  获取属性值[更新人]
     */
    public String getUpdateman(){
        return this.updateman;
    }
    /**
     *  重置属性值[更新人]
     */
    public void resetUpdateman(){
        this.set("updatemandirtyflag",false);
        this.updateman = null;
    }
    /**
     *  设置属性值[用户数据]
     *  @param userdata
     */
    public void setUserdata(String userdata){
        if(StringUtils.isEmpty(userdata))
            userdata=null;
        this.userdata = userdata;
        this.set("userdatadirtyflag",true);
    }
    /**
     *  获取属性值[用户数据]
     */
    public String getUserdata(){
        return this.userdata;
    }
    /**
     *  重置属性值[用户数据]
     */
    public void resetUserdata(){
        this.set("userdatadirtyflag",false);
        this.userdata = null;
    }
    /**
     *  设置属性值[用户数据]
     *  @param userdata2
     */
    public void setUserdata2(String userdata2){
        if(StringUtils.isEmpty(userdata2))
            userdata2=null;
        this.userdata2 = userdata2;
        this.set("userdata2dirtyflag",true);
    }
    /**
     *  获取属性值[用户数据]
     */
    public String getUserdata2(){
        return this.userdata2;
    }
    /**
     *  重置属性值[用户数据]
     */
    public void resetUserdata2(){
        this.set("userdata2dirtyflag",false);
        this.userdata2 = null;
    }
    /**
     *  设置属性值[用户数据]
     *  @param userdata3
     */
    public void setUserdata3(String userdata3){
        if(StringUtils.isEmpty(userdata3))
            userdata3=null;
        this.userdata3 = userdata3;
        this.set("userdata3dirtyflag",true);
    }
    /**
     *  获取属性值[用户数据]
     */
    public String getUserdata3(){
        return this.userdata3;
    }
    /**
     *  重置属性值[用户数据]
     */
    public void resetUserdata3(){
        this.set("userdata3dirtyflag",false);
        this.userdata3 = null;
    }
    /**
     *  设置属性值[用户数据]
     *  @param userdata4
     */
    public void setUserdata4(String userdata4){
        if(StringUtils.isEmpty(userdata4))
            userdata4=null;
        this.userdata4 = userdata4;
        this.set("userdata4dirtyflag",true);
    }
    /**
     *  获取属性值[用户数据]
     */
    public String getUserdata4(){
        return this.userdata4;
    }
    /**
     *  重置属性值[用户数据]
     */
    public void resetUserdata4(){
        this.set("userdata4dirtyflag",false);
        this.userdata4 = null;
    }
    /**
     *  设置属性值[用户数据信息]
     *  @param userdatainfo
     */
    public void setUserdatainfo(String userdatainfo){
        if(StringUtils.isEmpty(userdatainfo))
            userdatainfo=null;
        this.userdatainfo = userdatainfo;
        this.set("userdatainfodirtyflag",true);
    }
    /**
     *  获取属性值[用户数据信息]
     */
    public String getUserdatainfo(){
        return this.userdatainfo;
    }
    /**
     *  重置属性值[用户数据信息]
     */
    public void resetUserdatainfo(){
        this.set("userdatainfodirtyflag",false);
        this.userdatainfo = null;
    }
    /**
     *  设置属性值[用户标识]
     *  @param wfactorid
     */
    public void setWfactorid(String wfactorid){
        if(StringUtils.isEmpty(wfactorid))
            wfactorid=null;
        this.wfactorid = wfactorid;
        this.set("wfactoriddirtyflag",true);
    }
    /**
     *  获取属性值[用户标识]
     */
    public String getWfactorid(){
        return this.wfactorid;
    }
    /**
     *  重置属性值[用户标识]
     */
    public void resetWfactorid(){
        this.set("wfactoriddirtyflag",false);
        this.wfactorid = null;
    }
    /**
     *  设置属性值[流程实例]
     *  @param wfinstanceid
     */
    public void setWfinstanceid(String wfinstanceid){
        if(StringUtils.isEmpty(wfinstanceid))
            wfinstanceid=null;
        this.wfinstanceid = wfinstanceid;
        this.set("wfinstanceiddirtyflag",true);
    }
    /**
     *  获取属性值[流程实例]
     */
    public String getWfinstanceid(){
        return this.wfinstanceid;
    }
    /**
     *  重置属性值[流程实例]
     */
    public void resetWfinstanceid(){
        this.set("wfinstanceiddirtyflag",false);
        this.wfinstanceid = null;
    }
    /**
     *  设置属性值[流程实例]
     *  @param wfinstancename
     */
    public void setWfinstancename(String wfinstancename){
        if(StringUtils.isEmpty(wfinstancename))
            wfinstancename=null;
        this.wfinstancename = wfinstancename;
        this.set("wfinstancenamedirtyflag",true);
    }
    /**
     *  获取属性值[流程实例]
     */
    public String getWfinstancename(){
        //填充物理化的外键值附加数据
        if(StringUtils.isEmpty(this.wfinstancename)&&(!StringUtils.isEmpty(this.getWfinstanceid())) && this.getWfinstance()!=null)
        {
            this.wfinstancename = this.getWfinstance().getWfinstancename();
            this.set("wfinstancenamedirtyflag",true);
        }
        return this.wfinstancename;
    }
    /**
     *  重置属性值[流程实例]
     */
    public void resetWfinstancename(){
        this.set("wfinstancenamedirtyflag",false);
        this.wfinstancename = null;
    }
    /**
     *  设置属性值[流程语言资源]
     *  @param wflanrestag
     */
    public void setWflanrestag(String wflanrestag){
        if(StringUtils.isEmpty(wflanrestag))
            wflanrestag=null;
        this.wflanrestag = wflanrestag;
        this.set("wflanrestagdirtyflag",true);
    }
    /**
     *  获取属性值[流程语言资源]
     */
    public String getWflanrestag(){
        return this.wflanrestag;
    }
    /**
     *  重置属性值[流程语言资源]
     */
    public void resetWflanrestag(){
        this.set("wflanrestagdirtyflag",false);
        this.wflanrestag = null;
    }
    /**
     *  设置属性值[流程步骤标识]
     *  @param wfstepid
     */
    public void setWfstepid(String wfstepid){
        if(StringUtils.isEmpty(wfstepid))
            wfstepid=null;
        this.wfstepid = wfstepid;
        this.set("wfstepiddirtyflag",true);
    }
    /**
     *  获取属性值[流程步骤标识]
     */
    public String getWfstepid(){
        return this.wfstepid;
    }
    /**
     *  重置属性值[流程步骤标识]
     */
    public void resetWfstepid(){
        this.set("wfstepiddirtyflag",false);
        this.wfstepid = null;
    }
    /**
     *  设置属性值[步骤语言资源]
     *  @param wfsteplanrestag
     */
    public void setWfsteplanrestag(String wfsteplanrestag){
        if(StringUtils.isEmpty(wfsteplanrestag))
            wfsteplanrestag=null;
        this.wfsteplanrestag = wfsteplanrestag;
        this.set("wfsteplanrestagdirtyflag",true);
    }
    /**
     *  获取属性值[步骤语言资源]
     */
    public String getWfsteplanrestag(){
        return this.wfsteplanrestag;
    }
    /**
     *  重置属性值[步骤语言资源]
     */
    public void resetWfsteplanrestag(){
        this.set("wfsteplanrestagdirtyflag",false);
        this.wfsteplanrestag = null;
    }
    /**
     *  设置属性值[流程步骤名称]
     *  @param wfstepname
     */
    public void setWfstepname(String wfstepname){
        if(StringUtils.isEmpty(wfstepname))
            wfstepname=null;
        this.wfstepname = wfstepname;
        this.set("wfstepnamedirtyflag",true);
    }
    /**
     *  获取属性值[流程步骤名称]
     */
    public String getWfstepname(){
        return this.wfstepname;
    }
    /**
     *  重置属性值[流程步骤名称]
     */
    public void resetWfstepname(){
        this.set("wfstepnamedirtyflag",false);
        this.wfstepname = null;
    }
    /**
     *  设置属性值[工作流标识]
     *  @param wfworkflowid
     */
    public void setWfworkflowid(String wfworkflowid){
        if(StringUtils.isEmpty(wfworkflowid))
            wfworkflowid=null;
        this.wfworkflowid = wfworkflowid;
        this.set("wfworkflowiddirtyflag",true);
    }
    /**
     *  获取属性值[工作流标识]
     */
    public String getWfworkflowid(){
        return this.wfworkflowid;
    }
    /**
     *  重置属性值[工作流标识]
     */
    public void resetWfworkflowid(){
        this.set("wfworkflowiddirtyflag",false);
        this.wfworkflowid = null;
    }
    /**
     *  设置属性值[工作流名称]
     *  @param wfworkflowname
     */
    public void setWfworkflowname(String wfworkflowname){
        if(StringUtils.isEmpty(wfworkflowname))
            wfworkflowname=null;
        this.wfworkflowname = wfworkflowname;
        this.set("wfworkflownamedirtyflag",true);
    }
    /**
     *  获取属性值[工作流名称]
     */
    public String getWfworkflowname(){
        return this.wfworkflowname;
    }
    /**
     *  重置属性值[工作流名称]
     */
    public void resetWfworkflowname(){
        this.set("wfworkflownamedirtyflag",false);
        this.wfworkflowname = null;
    }
    /**
     *  设置属性值[流程工作列表标识]
     *  @param wfworklistid
     */
    public void setWfworklistid(String wfworklistid){
        if(StringUtils.isEmpty(wfworklistid))
            wfworklistid=null;
        this.wfworklistid = wfworklistid;
        this.set("wfworklistiddirtyflag",true);
    }
    /**
     *  获取属性值[流程工作列表标识]
     */
    public String getWfworklistid(){
        return this.wfworklistid;
    }
    /**
     *  重置属性值[流程工作列表标识]
     */
    public void resetWfworklistid(){
        this.set("wfworklistiddirtyflag",false);
        this.wfworklistid = null;
    }
    /**
     *  设置属性值[流程工作列表名称]
     *  @param wfworklistname
     */
    public void setWfworklistname(String wfworklistname){
        if(StringUtils.isEmpty(wfworklistname))
            wfworklistname=null;
        this.wfworklistname = wfworklistname;
        this.set("wfworklistnamedirtyflag",true);
    }
    /**
     *  获取属性值[流程工作列表名称]
     */
    public String getWfworklistname(){
        return this.wfworklistname;
    }
    /**
     *  重置属性值[流程工作列表名称]
     */
    public void resetWfworklistname(){
        this.set("wfworklistnamedirtyflag",false);
        this.wfworklistname = null;
    }
    /**
     *  设置属性值[工作通知]
     *  @param workinform
     */
    public void setWorkinform(Integer workinform){
        this.workinform = workinform;
        this.set("workinformdirtyflag",true);
    }
    /**
     *  获取属性值[工作通知]
     */
    public Integer getWorkinform(){
        return this.workinform;
    }
    /**
     *  重置属性值[工作通知]
     */
    public void resetWorkinform(){
        this.set("workinformdirtyflag",false);
        this.workinform = null;
    }
     /**
     *  获取主实体关联数据[WFInstance]
     */
    public WFInstance getWfinstance() {
        return wfinstance;
    }
    /**
     *  设置主实体关联数据[WFInstance]
     */
    public void setWfinstance(WFInstance wfinstance) {
        this.wfinstance = wfinstance;
    }

     /**
     *  获取主实体关联数据[WFUser]
     */
    public WFUser getOriginalwfuser() {
        return originalwfuser;
    }
    /**
     *  设置主实体关联数据[WFUser]
     */
    public void setOriginalwfuser(WFUser originalwfuser) {
        this.originalwfuser = originalwfuser;
    }

    /**
     * 重置当前数据对象属性值
     */
    public  void reset(){
        resetCancelflag();
        resetCancelinform();
        resetCreatedate();
        resetCreateman();
        resetOriginalwfuserid();
        resetOriginalwfusername();
        resetUpdatedate();
        resetUpdateman();
        resetUserdata();
        resetUserdata2();
        resetUserdata3();
        resetUserdata4();
        resetUserdatainfo();
        resetWfactorid();
        resetWfinstanceid();
        resetWfinstancename();
        resetWflanrestag();
        resetWfstepid();
        resetWfsteplanrestag();
        resetWfstepname();
        resetWfworkflowid();
        resetWfworkflowname();
        resetWfworklistid();
        resetWfworklistname();
        resetWorkinform();
    }
     /**
     * 获取数据主键（普通主键与联合主键）
     * @return
     */
    @JsonIgnore
    public Serializable getDefaultPrimaryKey()
    {
	    //随机生成主键
         return  IdWorker.get32UUID();

    }
     /**
     * 复制当前对象数据到目标对象(粘贴重置)
     *
     * @throws Exception
     */
    public WFWorkList copyTo(WFWorkList targetEntity)
	{
		BeanCopier copier=BeanCopier.create(WFWorkList.class, WFWorkList.class, false);
		copier.copy(this, targetEntity, null);
        targetEntity.resetWfworklistid();
		return targetEntity;
	}
}